-- GENERATED SPELL FOR [Thuzadin Necromancer] --


function spell0_10400(pUnit, Event) --@Bone Armor,n/a--
pUnit:FullCastSpellOnTarget(16431,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10400', 536, 1)
end

function spell1_10400(pUnit, Event) --@Soul Tap,n/a--
pUnit:FullCastSpellOnTarget(16430,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_10400', 12000, 1)
end

function spell2_10400(pUnit, Event) --@Summon Skeletal Servant,Self--
pUnit:FullCastSpellOnTarget(12420,pUnit)
pUnit:RegisterEvent('Sorts_10400', 577, 1)
end

function Sorts_10400(pUnit, Event)
local choix_sorts_10400 = math.random(0, 2)
if choix_sorts_10400 == 0 then
pUnit:RegisterEvent('spell0_10400', 1, 1)
end
if choix_sorts_10400 == 1 then
pUnit:RegisterEvent('spell1_10400', 1, 1)
end
if choix_sorts_10400 == 2 then
pUnit:RegisterEvent('spell2_10400', 1, 1)
end
end

function mob10400_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_10400', math.random(1500, 3000), 1)
end

function mob10400_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10400_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob10400_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(10400, 1, 'mob10400_Action')
RegisterUnitEvent(10400, 2, 'mob10400_Leave')
RegisterUnitEvent(10400, 3, 'mob10400_Kill')
RegisterUnitEvent(10400, 4, 'mob10400_Die')
